package com.softservecom.training.shop.pojos;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Manufactues entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Manufactues", schema = "dbo", catalog = "Java")
public class Manufactues implements java.io.Serializable {

	// Fields

	private Integer manufactureId;
	private String manufactureName;
	private Set<Products> productses = new HashSet<Products>(0);

	// Constructors

	/** default constructor */
	public Manufactues() {
	}

	/** minimal constructor */
	public Manufactues(Integer manufactureId, String manufactureName) {
		this.manufactureId = manufactureId;
		this.manufactureName = manufactureName;
	}

	/** full constructor */
	public Manufactues(Integer manufactureId, String manufactureName,
			Set<Products> productses) {
		this.manufactureId = manufactureId;
		this.manufactureName = manufactureName;
		this.productses = productses;
	}

	// Property accessors
	@Id
	@Column(name = "ManufactureID", unique = true, nullable = false)
	public Integer getManufactureId() {
		return this.manufactureId;
	}

	public void setManufactureId(Integer manufactureId) {
		this.manufactureId = manufactureId;
	}

	@Column(name = "ManufactureName", nullable = false, length = 50)
	public String getManufactureName() {
		return this.manufactureName;
	}

	public void setManufactureName(String manufactureName) {
		this.manufactureName = manufactureName;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "manufactues")
	public Set<Products> getProductses() {
		return this.productses;
	}

	public void setProductses(Set<Products> productses) {
		this.productses = productses;
	}

}